<!-- #include file="inc/includes.asp" -->
<!-- #include file="header.asp" -->
<%
set objUpload = new clsUpload
for i = 0 To objUpload.Count -1
    strErrorMessage = ""
    Ext = objUpload(i).FileExt
    Select Case Ext
    Case "MDB", "mdb"
        strServerPath = Server.MapPath("database/"&objUpload(i).FileName)
        set fs = Server.CreateObject("Scripting.FileSystemObject")
        if fs.FileExists(strServerPath) = true then
            strErrorMessage = "File allready exists"
        else
            objUpload(i).SaveAs strServerPath
            strErrorMessage = "File uploaded to folder: " & strServerPath
        end if
        set fs = nothing
    Case Else
        if objUpload(i).FileName&"" = "" then
            strErrorMessage = "You need to select a file, or use the one in this bundle"
        else
            strErrorMessage = "You need to upload a database file with extention: MDB or mdb"
        end if
    End Select
next
set objUpload = nothing
%>
<h1>Uploading the database.</h1>
<p class="error"><%=strErrorMessage%></p><br />
<!-- #include file="footer.asp" -->